//
//  QZEditUserMsgCell.m
//  WeiWeiHaircut
//
//  Created by 上官惠阳 on 15/12/10.
//  Copyright © 2015年 超群. All rights reserved.
//

#import "QZEditUserMsgCell.h"

@implementation QZEditUserMsgCell

- (void)awakeFromNib {
    self.contentView.backgroundColor = BACKGROUDCOLOR;
    self.contentTextView.returnKeyType = UIReturnKeyDone;
    self.contentTextView.delegate = self;
}
-(void)textViewDidChange:(UITextView *)textView
{
    if (textView.text.length) {
        self.alertLabel.hidden = YES;
    }else{
        self.alertLabel.hidden = NO;
    }
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
    if ([text isEqualToString:@"\n"]){ //判断输入的字是否是回车，即按下return
        //在这里做你响应return键的代码
        [textView resignFirstResponder];
        return NO; //这里返回NO，就代表return键值失效，即页面上按下return，不会出现换行，如果为yes，则输入页面会换行
    }
    
    return YES;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
